global root_path "/Volumes/Workgroup/Lab/Lab-heimb/Montenovo/Volunteering Paper/Data"

clear all
set maxvar 32767

cd "$root_path/02_ready_for_PSIDclean"

use individ_family_2007.dta, clear

cd "$root_path/03_ready_for_TAXSIM"


**HH ID
rename ER36002 family_id

gen unique_id_crossys=(ER30001*1000) + ER30002

gen sequence_num=ER33902


rename ER30000 release_number
rename ER30001 interview_number_1986
rename ER30002 person_number

gen white_w=0
replace white_w=1 if ER40472==1 & ER40473==0 & ER40474==0 & ER40475==0

gen black_w=0
replace black_w=1 if ER40472==2 & ER40473==0 & ER40474==0 & ER40475==0

gen native_amer_w=0
replace native_amer_w=1 if ER40472==3 & ER40473==0 & ER40474==0 & ER40475==0

gen asian_w=0
replace asian_w=1 if ER40472==4 & ER40473==0 & ER40474==0 & ER40475==0

*gen latino_w=0
*replace latino_w=1 if ER40472==5 & ER40473==0 & ER40474==0 & ER40475==0

gen other_w=0
replace other_w=1 if (ER40472>=5) 
replace other_w=1 if ER40473!=0 | ER40474!=0 | ER40475!=0

gen any_race_w=white_w+black_w+native_amer_w+asian_w+other_w
sum any_race_w

*  3,721 have no recorded race in OUR data
*  3,524: no wife present
*  3,721-3,524 are mixed race so we did not code them yet

* husband
gen white_h=0
replace white_h=1 if ER40565==1 & ER40566==0 & ER40567==0 & ER40568==0

gen black_h=0
replace black_h=1 if ER40565==2 & ER40566==0 & ER40567==0 & ER40568==0

gen native_amer_h=0
replace native_amer_h=1 if ER40565==3 & ER40566==0 & ER40567==0 & ER40568==0

gen asian_h=0
replace asian_h=1 if ER40565==4 & ER40566==0 & ER40567==0 & ER40568==0

*gen native_h=0
*replace native_h=1 if ER40565==5 & ER40566==0 & ER40567==0 & ER40568==0

gen other_h=0
replace other_h=1 if (ER40565>=5)
replace other_h=1 if ER40566!=0 | ER40567!=0 | ER40568!=0

** State of residence.
rename ER36003 state_residence
rename ER36004 state_current

** RAW FIELDS.
** Marriage stuff.
rename ER36023 marital_status_head
rename ER41039 marital_status_generated
rename ER36018 sex_head

gen married=0
replace married=1 if marital_status_head==1

keep if (sequence_num==1 & married==0) | (sequence_num==1 & married==1) | (sequence_num==2 & married==1)


** Children.
rename ER36020 children
** Ages.
rename ER36017 age_head
rename ER36019 age_wife
rename ER36021 age_youngest_child
** Salary.
rename ER36109 emplstat_head
rename ER36113 work_for_money_head
rename ER36146 how_paid_head
rename ER36147 salary_hd
rename ER36148 salary_frequency_head
rename ER36367 emplstat_wife
rename ER36371 work_for_money_wife
rename ER36405 salary_wife
rename ER36406 salary_frequency_wife
** Batch income fields.
rename ER36854 g4_pyr_net_farm_income
rename ER36869 g11b_profit_loss_bus_1
rename ER36883 g11b_profit_loss_bus_2
rename ER36897 g11b_profit_loss_bus_3
rename ER36911 g11b_profit_loss_bus_4
rename ER36925 g11b_profit_loss_bus_5
rename ER36930 g14_16_hd_bonus_ot_comm
rename ER36944 amt_other_labor_y_head
rename ER36947 g18a_wtr_head_prof_pract
rename ER36951 prof_trade_income_h_jan
rename ER36952 prof_trade_income_h_feb
rename ER36953 prof_trade_income_h_mar
rename ER36954 prof_trade_income_h_apr
rename ER36955 prof_trade_income_h_may
rename ER36956 prof_trade_income_h_jun
rename ER36957 prof_trade_income_h_jul
rename ER36958 prof_trade_income_h_aug
rename ER36959 prof_trade_income_h_sep
rename ER36960 prof_trade_income_h_oct
rename ER36961 prof_trade_income_h_nov
rename ER36962 prof_trade_income_h_dec
rename ER36964 g18b_wtr_head_mkt_gdning
rename ER36968 garden_farm_income_h_jan
rename ER36969 garden_farm_income_h_feb
rename ER36970 garden_farm_income_h_mar
rename ER36971 garden_farm_income_h_apr
rename ER36972 garden_farm_income_h_may
rename ER36973 garden_farm_income_h_jun
rename ER36974 garden_farm_income_h_jul
rename ER36975 garden_farm_income_h_aug
rename ER36976 garden_farm_income_h_sep
rename ER36977 garden_farm_income_h_oct
rename ER36978 garden_farm_income_h_nov
rename ER36979 garden_farm_income_h_dec
rename ER36981 g18c_wtr_head_roomers
rename ER36985 room_bord_income_h_jan
rename ER36986 room_bord_income_h_feb
rename ER36987 room_bord_income_h_mar
rename ER36988 room_bord_income_h_apr
rename ER36989 room_bord_income_h_may
rename ER36990 room_bord_income_h_jun
rename ER36991 room_bord_income_h_jul
rename ER36992 room_bord_income_h_aug
rename ER36993 room_bord_income_h_sep
rename ER36994 room_bord_income_h_oct
rename ER36995 room_bord_income_h_nov
rename ER36996 room_bord_income_h_dec
rename ER37001 g25a_whether_rent_head
rename ER37006 rent_income_head_jan
rename ER37007 rent_income_head_feb
rename ER37008 rent_income_head_mar
rename ER37009 rent_income_head_apr
rename ER37010 rent_income_head_may
rename ER37011 rent_income_head_jun
rename ER37012 rent_income_head_jul
rename ER37013 rent_income_head_aug
rename ER37014 rent_income_head_sep
rename ER37015 rent_income_head_oct
rename ER37016 rent_income_head_nov
rename ER37017 rent_income_head_dec
rename ER37018 g25b_whether_dividends_head
rename ER37019 dividends_head_amt
rename ER37020 dividends_head_freq
rename ER37022 dividends_head_include_wife
rename ER37023 dividend_income_head_jan
rename ER37024 dividend_income_head_feb
rename ER37025 dividend_income_head_mar
rename ER37026 dividend_income_head_apr
rename ER37027 dividend_income_head_may
rename ER37028 dividend_income_head_jun
rename ER37029 dividend_income_head_jul
rename ER37030 dividend_income_head_aug
rename ER37031 dividend_income_head_sep
rename ER37032 dividend_income_head_oct
rename ER37033 dividend_income_head_nov
rename ER37034 dividend_income_head_dec
rename ER37035 g25c_whether_interest_head
rename ER37040 interest_income_head_jan
rename ER37041 interest_income_head_feb
rename ER37042 interest_income_head_mar
rename ER37043 interest_income_head_apr
rename ER37044 interest_income_head_may
rename ER37045 interest_income_head_jun
rename ER37046 interest_income_head_jul
rename ER37047 interest_income_head_aug
rename ER37048 interest_income_head_sep
rename ER37049 interest_income_head_oct
rename ER37050 interest_income_head_nov
rename ER37051 interest_income_head_dec
rename ER37052 whether_trust_fund_head
rename ER37056 trust_royal_income_h_jan
rename ER37057 trust_royal_income_h_feb
rename ER37058 trust_royal_income_h_mar
rename ER37059 trust_royal_income_h_apr
rename ER37060 trust_royal_income_h_may
rename ER37061 trust_royal_income_h_jun
rename ER37062 trust_royal_income_h_jul
rename ER37063 trust_royal_income_h_aug
rename ER37064 trust_royal_income_h_sep
rename ER37065 trust_royal_income_h_oct
rename ER37066 trust_royal_income_h_nov
rename ER37067 trust_royal_income_h_dec
rename ER37068 g25e_whether_adc_tanf_head
rename ER37072 adc_tanf_income_head_jan
rename ER37073 adc_tanf_income_head_feb
rename ER37074 adc_tanf_income_head_mar
rename ER37075 adc_tanf_income_head_apr
rename ER37076 adc_tanf_income_head_may
rename ER37077 adc_tanf_income_head_jun
rename ER37078 adc_tanf_income_head_jul
rename ER37079 adc_tanf_income_head_aug
rename ER37080 adc_tanf_income_head_sep
rename ER37081 adc_tanf_income_head_oct
rename ER37082 adc_tanf_income_head_nov
rename ER37083 adc_tanf_income_head_dec
rename ER37084 g25f_whether_ssi_head
rename ER37086 ssi_of_head
rename ER37087 ssi_of_head_per
rename ER37089 ssi_income_head_jan
rename ER37090 ssi_income_head_feb
rename ER37091 ssi_income_head_mar
rename ER37092 ssi_income_head_apr
rename ER37093 ssi_income_head_may
rename ER37094 ssi_income_head_jun
rename ER37095 ssi_income_head_jul
rename ER37096 ssi_income_head_aug
rename ER37097 ssi_income_head_sep
rename ER37098 ssi_income_head_oct
rename ER37099 ssi_income_head_nov
rename ER37100 ssi_income_head_dec
rename ER37101 g25g_whether_other_welfare_hd
rename ER37105 otr_welfare_income_h_jan
rename ER37106 otr_welfare_income_h_feb
rename ER37107 otr_welfare_income_h_mar
rename ER37108 otr_welfare_income_h_apr
rename ER37109 otr_welfare_income_h_may
rename ER37110 otr_welfare_income_h_jun
rename ER37111 otr_welfare_income_h_jul
rename ER37112 otr_welfare_income_h_aug
rename ER37113 otr_welfare_income_h_sep
rename ER37114 otr_welfare_income_h_oct
rename ER37115 otr_welfare_income_h_nov
rename ER37116 otr_welfare_income_h_dec
rename ER37117 g31_any_fu_memb_get_socsec
rename ER37118 g37_whether_head_va_pension
rename ER37122 va_income_head_jan
rename ER37123 va_income_head_feb
rename ER37124 va_income_head_mar
rename ER37125 va_income_head_apr
rename ER37126 va_income_head_may
rename ER37127 va_income_head_jun
rename ER37128 va_income_head_jul
rename ER37129 va_income_head_aug
rename ER37130 va_income_head_sep
rename ER37131 va_income_head_oct
rename ER37132 va_income_head_nov
rename ER37133 va_income_head_dec
rename ER37134 g40a_wtr_nonva_retiremt_head
rename ER37135 nonva_retiremt_head_amt
rename ER37136 nonva_retiremt_head_unit
rename ER37138 retirement_income_h_jan
rename ER37139 retirement_income_h_feb
rename ER37140 retirement_income_h_mar
rename ER37141 retirement_income_h_apr
rename ER37142 retirement_income_h_may
rename ER37143 retirement_income_h_jun
rename ER37144 retirement_income_h_jul
rename ER37145 retirement_income_h_aug
rename ER37146 retirement_income_h_sep
rename ER37147 retirement_income_h_oct
rename ER37148 retirement_income_h_nov
rename ER37149 retirement_income_h_dec
rename ER37150 g40b_whether_head_annuities
rename ER37154 annuities_income_jan
rename ER37155 annuities_income_feb
rename ER37156 annuities_income_mar
rename ER37157 annuities_income_apr
rename ER37158 annuities_income_may
rename ER37159 annuities_income_jun
rename ER37160 annuities_income_jul
rename ER37161 annuities_income_aug
rename ER37162 annuities_income_sep
rename ER37163 annuities_income_oct
rename ER37164 annuities_income_nov
rename ER37165 annuities_income_dec
rename ER37166 g40c_whether_head_otr_pension
rename ER37170 otr_pension_head_jan
rename ER37171 otr_pension_head_feb
rename ER37172 otr_pension_head_mar
rename ER37173 otr_pension_head_apr
rename ER37174 otr_pension_head_may
rename ER37175 otr_pension_head_jun
rename ER37176 otr_pension_head_jul
rename ER37177 otr_pension_head_aug
rename ER37178 otr_pension_head_sep
rename ER37179 otr_pension_head_oct
rename ER37180 otr_pension_head_nov
rename ER37181 otr_pension_head_dec
rename ER37182 g43_num_of_head_non_va_pensn
rename ER37187 unemploy_income_head_jan
rename ER37188 unemploy_income_head_feb
rename ER37189 unemploy_income_head_mar
rename ER37190 unemploy_income_head_apr
rename ER37191 unemploy_income_head_may
rename ER37192 unemploy_income_head_jun
rename ER37193 unemploy_income_head_jul
rename ER37194 unemploy_income_head_aug
rename ER37195 unemploy_income_head_sep
rename ER37196 unemploy_income_head_oct
rename ER37197 unemploy_income_head_nov
rename ER37198 unemploy_income_head_dec
rename ER37199 g44b_wtr_workmen_comp_of_head
rename ER37203 worker_comp_income_h_jan
rename ER37204 worker_comp_income_h_feb
rename ER37205 worker_comp_income_h_mar
rename ER37206 worker_comp_income_h_apr
rename ER37207 worker_comp_income_h_may
rename ER37212 worker_comp_income_h_oct
rename ER37213 worker_comp_income_h_nov
rename ER37214 worker_comp_income_h_dec
rename ER37215 g44c_wtr_child_support_of_hd
rename ER37219 child_support_inc_h_jan
rename ER37220 child_support_inc_h_feb
rename ER37221 child_support_inc_h_mar
rename ER37222 child_support_inc_h_apr
rename ER37223 child_support_inc_h_may
rename ER37224 child_support_inc_h_jun
rename ER37225 child_support_inc_h_jul
rename ER37226 child_support_inc_h_aug
rename ER37227 child_support_inc_h_sep
rename ER37228 child_support_inc_h_oct
rename ER37229 child_support_inc_h_nov
rename ER37230 child_support_inc_h_dec
rename ER37231 g44d_wtr_alimony_of_head
rename ER37235 alimony_income_head_jan
rename ER37236 alimony_income_head_feb
rename ER37237 alimony_income_head_mar
rename ER37238 alimony_income_head_apr
rename ER37239 alimony_income_head_may
rename ER37240 alimony_income_head_jun
rename ER37241 alimony_income_head_jul
rename ER37242 alimony_income_head_aug
rename ER37243 alimony_income_head_sep
rename ER37244 alimony_income_head_oct
rename ER37245 alimony_income_head_nov
rename ER37246 alimony_income_head_dec
rename ER37251 help_from_relative_h_jan
rename ER37252 help_from_relative_h_feb
rename ER37253 help_from_relative_h_mar
rename ER37254 help_from_relative_h_apr
rename ER37255 help_from_relative_h_may
rename ER37256 help_from_relative_h_jun
rename ER37257 help_from_relative_h_jul
rename ER37258 help_from_relative_h_aug
rename ER37259 help_from_relative_h_sep
rename ER37260 help_from_relative_h_oct
rename ER37261 help_from_relative_h_nov
rename ER37262 help_from_relative_h_dec
rename ER37267 help_from_others_h_jan
rename ER37268 help_from_others_h_feb
rename ER37269 help_from_others_h_mar
rename ER37270 help_from_others_h_apr
rename ER37271 help_from_others_h_may
rename ER37272 help_from_others_h_jun
rename ER37273 help_from_others_h_jul
rename ER37274 help_from_others_h_aug
rename ER37275 help_from_others_h_sep
rename ER37276 help_from_others_h_oct
rename ER37277 help_from_others_h_nov
rename ER37278 help_from_others_h_dec
rename ER37279 g44g_wtr_anything_else_of_hd
rename ER37283 any_other_income_h_jan
rename ER37284 any_other_income_h_feb
rename ER37285 any_other_income_h_mar
rename ER37286 any_other_income_h_apr
rename ER37287 any_other_income_h_may
rename ER37288 any_other_income_h_jun
rename ER37289 any_other_income_h_jul
rename ER37290 any_other_income_h_aug
rename ER37291 any_other_income_h_sep
rename ER37292 any_other_income_h_oct
rename ER37293 any_other_income_h_nov
rename ER37294 any_other_income_h_dec
rename ER37296 g50_whether_wife_had_income
rename ER37306 unemploy_income_wife_jan
rename ER37307 unemploy_income_wife_feb
rename ER37308 unemploy_income_wife_mar
rename ER37309 unemploy_income_wife_apr
rename ER37310 unemploy_income_wife_may
rename ER37311 unemploy_income_wife_jun
rename ER37312 unemploy_income_wife_jul
rename ER37313 unemploy_income_wife_aug
rename ER37314 unemploy_income_wife_sep
rename ER37315 unemploy_income_wife_oct
rename ER37316 unemploy_income_wife_nov
rename ER37317 unemploy_income_wife_dec
rename ER37322 worker_comp_income_w_jan
rename ER37323 worker_comp_income_w_feb
rename ER37324 worker_comp_income_w_mar
rename ER37325 worker_comp_income_w_apr
rename ER37326 worker_comp_income_w_may
rename ER37327 worker_comp_income_w_jun
rename ER37328 worker_comp_income_w_jul
rename ER37329 worker_comp_income_w_aug
rename ER37330 worker_comp_income_w_sep
rename ER37331 worker_comp_income_w_oct
rename ER37332 worker_comp_income_w_nov
rename ER37333 worker_comp_income_w_dec
rename ER37334 g59a_whether_wife_rent
rename ER37339 rent_income_wife_jan
rename ER37340 rent_income_wife_feb
rename ER37341 rent_income_wife_mar
rename ER37342 rent_income_wife_apr
rename ER37343 rent_income_wife_may
rename ER37344 rent_income_wife_jun
rename ER37345 rent_income_wife_jul
rename ER37346 rent_income_wife_aug
rename ER37347 rent_income_wife_sep
rename ER37348 rent_income_wife_oct
rename ER37349 rent_income_wife_nov
rename ER37350 rent_income_wife_dec
rename ER37351 g59b_whether_wife_dividends
rename ER37352 dividends_wife_amt
rename ER37353 dividends_wife_freq
rename ER37355 dividends_wife_separate
rename ER37356 dividend_income_wife_jan
rename ER37357 dividend_income_wife_feb
rename ER37358 dividend_income_wife_mar
rename ER37359 dividend_income_wife_apr
rename ER37360 dividend_income_wife_may
rename ER37361 dividend_income_wife_jun
rename ER37362 dividend_income_wife_jul
rename ER37363 dividend_income_wife_aug
rename ER37364 dividend_income_wife_sep
rename ER37365 dividend_income_wife_oct
rename ER37366 dividend_income_wife_nov
rename ER37367 dividend_income_wife_dec
rename ER37368 g59c_whether_wife_interest
rename ER37373 interest_income_wife_jan
rename ER37374 interest_income_wife_feb
rename ER37375 interest_income_wife_mar
rename ER37376 interest_income_wife_apr
rename ER37377 interest_income_wife_may
rename ER37378 interest_income_wife_jun
rename ER37379 interest_income_wife_jul
rename ER37380 interest_income_wife_aug
rename ER37381 interest_income_wife_sep
rename ER37382 interest_income_wife_oct
rename ER37383 interest_income_wife_nov
rename ER37384 interest_income_wife_dec
rename ER37385 g59d_whether_wife_trust_fund
rename ER37389 trust_income_wife_jan
rename ER37390 trust_income_wife_feb
rename ER37391 trust_income_wife_mar
rename ER37392 trust_income_wife_apr
rename ER37393 trust_income_wife_may
rename ER37394 trust_income_wife_jun
rename ER37395 trust_income_wife_jul
rename ER37396 trust_income_wife_aug
rename ER37397 trust_income_wife_sep
rename ER37398 trust_income_wife_oct
rename ER37399 trust_income_wife_nov
rename ER37400 trust_income_wife_dec
rename ER37401 g60a_whether_wife_recd_ssi
rename ER37403 ssi_of_wife_amt
rename ER37404 ssi_of_wife_amt_per
rename ER37406 ssi_income_wife_jan
rename ER37407 ssi_income_wife_feb
rename ER37408 ssi_income_wife_mar
rename ER37409 ssi_income_wife_apr
rename ER37410 ssi_income_wife_may
rename ER37411 ssi_income_wife_jun
rename ER37412 ssi_income_wife_jul
rename ER37413 ssi_income_wife_aug
rename ER37414 ssi_income_wife_sep
rename ER37415 ssi_income_wife_oct
rename ER37416 ssi_income_wife_nov
rename ER37417 ssi_income_wife_dec
rename ER37418 g60b_wtr_wife_recd_adc_tanf
rename ER37422 adc_tanf_income_wife_jan
rename ER37423 adc_tanf_income_wife_feb
rename ER37424 adc_tanf_income_wife_mar
rename ER37425 adc_tanf_income_wife_apr
rename ER37426 adc_tanf_income_wife_may
rename ER37427 adc_tanf_income_wife_jun
rename ER37428 adc_tanf_income_wife_jul
rename ER37429 adc_tanf_income_wife_aug
rename ER37430 adc_tanf_income_wife_sep
rename ER37431 adc_tanf_income_wife_oct
rename ER37432 adc_tanf_income_wife_nov
rename ER37433 adc_tanf_income_wife_dec
rename ER37434 g60c_wtr_wf_recd_child_supprt
rename ER37438 child_support_inc_w_jan
rename ER37439 child_support_inc_w_feb
rename ER37440 child_support_inc_w_mar
rename ER37441 child_support_inc_w_apr
rename ER37442 child_support_inc_w_may
rename ER37443 child_support_inc_w_jun
rename ER37444 child_support_inc_w_jul
rename ER37445 child_support_inc_w_aug
rename ER37446 child_support_inc_w_sep
rename ER37447 child_support_inc_w_oct
rename ER37448 child_support_inc_w_nov
rename ER37449 child_support_inc_w_dec
rename ER37450 g60d_wtr_wf_recd_otr_welfare
rename ER37454 other_welfare_inc_w_jan
rename ER37455 other_welfare_inc_w_feb
rename ER37456 other_welfare_inc_w_mar
rename ER37457 other_welfare_inc_w_apr
rename ER37458 other_welfare_inc_w_may
rename ER37459 other_welfare_inc_w_jun
rename ER37460 other_welfare_inc_w_jul
rename ER37461 other_welfare_inc_w_aug
rename ER37462 other_welfare_inc_w_sep
rename ER37463 other_welfare_inc_w_oct
rename ER37464 other_welfare_inc_w_nov
rename ER37465 other_welfare_inc_w_dec
rename ER37466 g61_wtr_wf_recd_pens_annuity
rename ER37470 pension_annuity_w_jan
rename ER37471 pension_annuity_w_feb
rename ER37472 pension_annuity_w_mar
rename ER37473 pension_annuity_w_apr
rename ER37474 pension_annuity_w_may
rename ER37475 pension_annuity_w_jun
rename ER37476 pension_annuity_w_jul
rename ER37477 pension_annuity_w_aug
rename ER37478 pension_annuity_w_sep
rename ER37479 pension_annuity_w_oct
rename ER37480 pension_annuity_w_nov
rename ER37481 pension_annuity_w_dec
rename ER37486 help_fr_relatives_wf_jan
rename ER37487 help_fr_relatives_wf_feb
rename ER37488 help_fr_relatives_wf_mar
rename ER37489 help_fr_relatives_wf_apr
rename ER37490 help_fr_relatives_wf_may
rename ER37491 help_fr_relatives_wf_jun
rename ER37492 help_fr_relatives_wf_jul
rename ER37493 help_fr_relatives_wf_aug
rename ER37494 help_fr_relatives_wf_sep
rename ER37495 help_fr_relatives_wf_oct
rename ER37496 help_fr_relatives_wf_nov
rename ER37497 help_fr_relatives_wf_dec
rename ER37502 help_from_friends_w_jan
rename ER37503 help_from_friends_w_feb
rename ER37504 help_from_friends_w_mar
rename ER37505 help_from_friends_w_apr
rename ER37506 help_from_friends_w_may
rename ER37507 help_from_friends_w_jun
rename ER37508 help_from_friends_w_jul
rename ER37509 help_from_friends_w_aug
rename ER37510 help_from_friends_w_sep
rename ER37511 help_from_friends_w_oct
rename ER37512 help_from_friends_w_nov
rename ER37513 help_from_friends_w_dec
rename ER37514 g63_wtr_wfe_recd_otr_income
rename ER37518 any_other_income_w_jan
rename ER37519 any_other_income_w_feb
rename ER37520 any_other_income_w_mar
rename ER37521 any_other_income_w_apr
rename ER37522 any_other_income_w_may
rename ER37523 any_other_income_w_jun
rename ER37524 any_other_income_w_jul
rename ER37525 any_other_income_w_aug
rename ER37526 any_other_income_w_sep
rename ER37527 any_other_income_w_oct
rename ER37528 any_other_income_w_nov
rename ER37529 any_other_income_w_dec
rename ER37533 g102_wtr_itemize_for_tax
rename ER37543 g106_total_supp_of_otrs
rename ER37573 revised_dividends
rename ER37574 revised_dividends_unit
rename ER37575 w20f_wtr_rec_rev_dividends_jan
rename ER37576 w20f_wtr_rec_rev_dividends_feb
rename ER37577 w20f_wtr_rec_rev_dividends_mar
rename ER37578 w20f_wtr_rec_rev_dividends_apr
rename ER37579 w20f_wtr_rec_rev_dividends_may
rename ER37580 w20f_wtr_rec_rev_dividends_jun
rename ER37581 w20f_wtr_rec_rev_dividends_jul
rename ER37582 w20f_wtr_rec_rev_dividends_aug
rename ER37583 w20f_wtr_rec_rev_dividends_sep
rename ER37584 w20f_wtr_rec_rev_dividends_oct
rename ER37585 w20f_wtr_rec_rev_dividends_nov
rename ER37586 w20f_wtr_rec_rev_dividends_dec
rename ER37602 w31f_wtr_rec_rev_interest_in_jan
rename ER37603 w31f_wtr_rec_rev_interest_in_feb
rename ER37604 w31f_wtr_rec_rev_interest_in_mar
rename ER37605 w31f_wtr_rec_rev_interest_in_apr
rename ER37606 w31f_wtr_rec_rev_interest_in_may
rename ER37607 w31f_wtr_rec_rev_interest_in_jun
rename ER37608 w31f_wtr_rec_rev_interest_in_jul
rename ER37609 w31f_wtr_rec_rev_interest_in_aug
rename ER37610 w31f_wtr_rec_rev_interest_in_sep
rename ER37611 w31f_wtr_rec_rev_interest_in_oct
rename ER37612 w31f_wtr_rec_rev_interest_in_nov
rename ER37613 w31f_wtr_rec_rev_interest_in_dec
rename ER40687 r16_wtr_rec_asset_y_yr_b4_last
rename ER40690 r19_wtr_rec_asset_y_jan_yr_b4lst
rename ER40691 r19_wtr_rec_asset_y_feb_yr_b4lst
rename ER40692 r19_wtr_rec_asset_y_mar_yr_b4lst
rename ER40693 r19_wtr_rec_asset_y_apr_yr_b4lst
rename ER40694 r19_wtr_rec_asset_y_may_yr_b4lst
rename ER40695 r19_wtr_rec_asset_y_jun_yr_b4lst
rename ER40696 r19_wtr_rec_asset_y_jul_yr_b4lst
rename ER40697 r19_wtr_rec_asset_y_aug_yr_b4lst
rename ER40698 r19_wtr_rec_asset_y_sep_yr_b4lst
rename ER40699 r19_wtr_rec_asset_y_oct_yr_b4lst
rename ER40700 r19_wtr_rec_asset_y_nov_yr_b4lst
rename ER40701 r19_wtr_rec_asset_y_dec_yr_b4lst
rename ER40702 r20_wtr_rec_soc_sec_yr_b4lst
rename ER40719 r25_wtr_recd_retirement_yr_b4lst
rename ER40722 r28_wtr_recd_reti_jan_yr_b4lst
rename ER40723 r28_wtr_recd_reti_feb_yr_b4lst
rename ER40724 r28_wtr_recd_reti_mar_yr_b4lst
rename ER40725 r28_wtr_recd_retir_apr_yr_b4lst
rename ER40726 r28_wtr_recd_retir_may_yr_b4lst
rename ER40727 r28_wtr_recd_retir_jun_yr_b4lst
rename ER40728 r28_wtr_recd_retir_jul_yr_b4lst
rename ER40729 r28_wtr_recd_retir_aug_yr_b4lst
rename ER40730 r28_wtr_recd_retir_sep_yr_b4lst
rename ER40731 r28_wtr_recd_retir_oct_yr_b4lst
rename ER40732 r28_wtr_recd_retir_nov_yr_b4lst
rename ER40733 r28_wtr_recd_retir_dec_yr_b4lst
rename ER40734 r29_wtr_rec_va_pension_yr_b4lst
rename ER40737 r32_wtr_rec_va_pens_jan_yr_b4lst
rename ER40738 r32_wtr_rec_va_pens_feb_yr_b4lst
rename ER40739 r32_wtr_rec_va_pens_mar_yr_b4lst
rename ER40740 r32_wtr_rec_va_pens_apr_yr_b4lst
rename ER40741 r32_wtr_rec_va_pens_may_yr_b4lst
rename ER40742 r32_wtr_rec_va_pens_jun_yr_b4lst
rename ER40743 r32_wtr_rec_va_pens_jul_yr_b4lst
rename ER40744 r32_wtr_rec_va_pens_aug_yr_b4lst
rename ER40745 r32_wtr_rec_va_pens_sep_yr_b4lst
rename ER40746 r32_wtr_rec_va_pens_oct_yr_b4lst
rename ER40747 r32_wtr_rec_va_pens_nov_yr_b4lst
rename ER40748 r32_wtr_rec_va_pens_dec_yr_b4lst
rename ER40749 r33_wtr_recd_unemp_comp_yr_b4lst
rename ER40764 r37_wtr_recd_wrks_cmp_yr_b4lst
rename ER40794 wtr_rec_ch_supp_almny_jan_yb4lst
rename ER40828 wtr_rec_ch_supp_almny_feb_yb4lst
rename ER40829 wtr_rec_ch_supp_almny_mar_yb4lst
rename ER40830 wtr_rec_ch_supp_almny_apr_yb4lst
rename ER40831 wtr_rec_ch_supp_almny_may_yb4lst
rename ER40832 wtr_rec_ch_supp_almny_jun_yb4lst
rename ER40833 wtr_rec_ch_supp_almny_jul_yb4lst
rename ER40834 wtr_rec_ch_supp_almny_aug_yb4lst
rename ER40835 wtr_rec_ch_supp_almny_sep_yb4lst
rename ER40836 wtr_rec_ch_supp_almny_oct_yb4lst
rename ER40837 wtr_rec_ch_supp_almny_nov_yb4lst
rename ER40838 wtr_rec_ch_supp_almny_dec_yb4lst
rename ER40854 r63_wtr_any_otr_income_2_yrs_ago
rename ER40855 r66_amt_of_income_2_yrs_ago
rename ER40856 r66_per_for_amt_of_inc_2_yrs_ago
rename ER40857 r67_wtr_recd_incom_jan_2_yrs_ago
rename ER40858 r67_wtr_recd_incom_feb_2_yrs_ago
rename ER40859 r67_wtr_recd_incom_mar_2_yrs_ago
rename ER40860 r67_wtr_recd_incom_apr_2_yrs_ago
rename ER40861 r67_wtr_recd_incom_may_2_yrs_ago
rename ER40862 r67_wtr_recd_incom_jun_2_yrs_ago
rename ER40863 r67_wtr_recd_incom_jul_2_yrs_ago
rename ER40864 r67_wtr_recd_incom_aug_2_yrs_ago
rename ER40865 r67_wtr_recd_incom_sep_2_yrs_ago
rename ER40866 r67_wtr_recd_incom_oct_2_yrs_ago
rename ER40867 r67_wtr_recd_incom_nov_2_yrs_ago
rename ER40868 r67_wtr_recd_incom_dec_2_yrs_ago
rename ER40916 acc_market_garden_income_of_head
rename ER40918 acc_of_head_addtional_job_income
** Rent (for state taxes).
rename ER36028 own_rent_or_what
rename ER36065 rent_amount
rename ER36066 rent_amount_unit
rename ER36069 rent_include_heat
rename ER36071 rent_paid_by_govt
rename ER36072 home_equivalent_rent
rename ER36073 home_equivalent_rent_unit
** Taxes.
rename ER36036 property_tax_annual
** Deductions.
** Strange bug from PSID dofile.
rename g102_wtr_item~x whether_itemized
rename ER37534 itemized_charitable
rename ER36535 itemized_medical
** Child care.
rename ER36633 childcare_expense
rename ER36634 childcare_expense_unit
rename ER37547 alimony_given
** Mortgage payments.
rename ER36041 mortgage1_original_or_refinanced
rename ER36042 mortgage1_principle_remaining
rename ER36044 mortgage1_payment
rename ER36046 mortgage1_interest_rate_wholenum
rename ER36047 mortgage1_interest_rate_fraction
rename ER36048 mortgage1_fixed_variable
rename ER36049 mortgage1_year_of_loan
rename ER36050 mortgage1_years_left
rename ER36051 mortgage2_binary
rename ER36052 mortgage2_type
rename ER36053 mortgage2_original_or_refinanced
rename ER36054 mortgage2_principle_remaining
rename ER36056 mortgage2_payment
rename ER36058 mortgage2_interest_rate_wholenum
rename ER36059 mortgage2_interest_rate_fraction
rename ER36060 mortgage2_fixed_variable
rename ER36061 mortgage2_year_of_loan
rename ER36062 mortgage2_years_left
rename ER36063 mortage_include_proptaxes
rename ER36064 mortgage_include_insurance


** Food consumption.
rename ER36702 food_stamps
rename ER36703 food_stamps_unit
rename ER36706 food_homestamps
rename ER36707 food_homestamps_unit
rename ER36710 food_deliveredstamps
rename ER36711 food_deliveredstamps_unit
rename ER36713 food_awaystamps
rename ER36714 food_awaystamps_unit
rename ER36716 food_home
rename ER36717 food_home_unit
rename ER36720 food_delivered
rename ER36721 food_delivered_unit
rename ER36723 food_away
rename ER36724 food_away_unit

** GENERATED FIELDS.
rename ER40895 unincorp_bus_inc_hh_gen
rename ER40900 unincorp_laborpt_inc_head_gen
rename ER40901 unincorp_assetpt_inc_head_gen
rename ER40898 farm_inc_head_gen
rename ER40903 wagesal_inc_head_gen
rename ER40905 bonus_inc_head_gen
rename ER40907 overtime_inc_head_gen
rename ER40909 tips_inc_head_gen
rename ER40911 commission_inc_head_gen
rename ER40913 trade_inc_head_gen
rename ER40915 gardening_inc_head_gen
rename ER40917 addljob_inc_head_gen
rename ER40921 labor_inc_head_gen
rename ER40922 rent_inc_head_gen
rename ER40924 dividend_inc_head_gen
rename ER40926 interest_inc_head_gen
rename ER40928 trustroyalty_inc_head_gen

rename ER40930 unincorp_laborpt_inc_wife_gen
rename ER40931 unincorp_assetpt_inc_wife_gen
rename ER40933 labor_inc_wife_gen
rename ER40935 rent_inc_wife_gen
rename ER40937 dividend_inc_wife_gen
rename ER40939 interest_inc_wife_gen
rename ER40941 trustroyalty_inc_wife_gen

rename ER40943 taxable_inc_hh_gen

rename ER40944 tanf_inc_head_gen
rename ER40946 ssi_inc_head_gen
rename ER40948 otherwelfare_inc_head_gen
rename ER40950 vapension_inc_head_gen
rename ER40952 nonva_retire_inc_head_gen
rename ER40954 annuities_inc_head_gen
rename ER40958 unemployment_inc_head_gen
rename ER40960 workerscomp_inc_head_gen
rename ER40962 childsupport_inc_head_gen
rename ER40964 alimony_inc_head_gen
rename ER40966 helprelatives_inc_head_gen
rename ER40968 helpothers_inc_head_gen
rename ER40970 misc_xfers_inc_head_gen

rename ER40972 tanf_inc_wife_gen
rename ER40974 ssi_inc_wife_gen
rename ER40976 otherwelfare_inc_wife_gen
rename ER40978 retire_annuities_inc_wife_gen
rename ER40980 unemployment_inc_wife_gen
rename ER40982 workerscomp_inc_wife_gen
rename ER40984 childsupport_inc_wife_gen
rename ER40986 helprelatives_inc_wife_gen
rename ER40988 helpothers_inc_wife_gen
rename ER40990 misc_xfers_inc_wife_gen

rename ER41021 socsec_inc_head_gen
rename ER41023 socsec_inc_wife_gen

rename ER36411 hr_wage_spouse
rename ER36153 hr_wage_hd
rename ER36928 tot_wage_hd
rename ER37299 tot_wage_spouse
rename ER40876 tot_hs_worked_head
rename ER40887 tot_hs_worked_spouse

rename ER40614 religion_hd
rename ER40521 religion_spouse
rename ER41033A rural

rename ER37183 whether_unemployed_head
rename ER37302 whether_unemployed_spouse

drop ER*

save fam2007er-small.dta, replace
